package ru.amse.tsyganov.jumleditor.graphicaleditor.collaboration;

import ru.amse.tsyganov.jumleditor.graphicaleditor.GraphicalEditor;
import ru.amse.tsyganov.jumleditor.graphicaleditor.common.AddStateMode;
import ru.amse.tsyganov.jumleditor.model.collaboration.Instance;
import ru.amse.tsyganov.jumleditor.model.common.State;
import ru.amse.tsyganov.jumleditor.view.collaboration.InstanceView;
import ru.amse.tsyganov.jumleditor.view.common.StateView;

public class AddInstanceMode extends AddStateMode {

	public AddInstanceMode(GraphicalEditor graphicalEditor) {
		super(graphicalEditor);
	}

	@Override
	public StateView<? extends State> createNewState() {
		Instance instance = new Instance();
		InstanceView<? extends Instance> newInstanceView = 
			new InstanceView<Instance>(instance, getEditor().getActivityGraphView());
		
		return newInstanceView;
	}

}
